<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  
  <meta name="generator" content="Hugo 0.98.0" />

  
  <meta name="description" content="走在通往幸福的路上">
  

  
  <link rel="apple-touch-icon" sizes="180x180" href="https://blog.v5u.win/apple-touch-icon.png">

  
  <link rel="icon" type="image/png" sizes="32x32" href="https://blog.v5u.win/favicon-32x32.png">

  
  <link rel="icon" type="image/png" sizes="16x16" href="https://blog.v5u.win/favicon-16x16.png">

  
  <link rel="manifest" href="https://blog.v5u.win/site.webmanifest">

  
  <link rel="mask-icon" href="https://blog.v5u.win/safari-pinned-tab.svg" color="">

  <meta name="msapplication-TileColor" content="">

  <meta name="theme-color" content="">

  
  <link rel="stylesheet" href="https://blog.v5u.win/css/bootstrap.min.css" />

  
  <title>use sublime Text | 为吾优</title>
  

  <style>
body {
  min-width: 300px;
}

.custom-navbar {
  margin-bottom: 1em;
  height: 60px;
}

.custom-navbar a {
  display: inline-block; 
  padding: 18px 0;
  margin-right: 1em; 
  font-weight: bold; 
}

.custom-navbar a:hover,
.custom-navbar a:focus {
  text-decoration: none; 
}

@media print {
  .custom-navbar {
    display: none;
  }
}

article {
  padding-bottom: 1em;
}

img {
  max-width: 100%;
}


body {
  background-color: #fff;
}



body {
  color: #212529;
}



a {
  color: #007bff;
}



a:hover,
a:focus {
  color: #0056b3;
}



.custom-navbar {
  background-color: #212529;
}



.custom-navbar a {
  color: rgba(255,255,255,.75);
}



.custom-navbar a:hover,
.custom-navbar a:focus {
  color: rgba(255,255,255,1);
}



.container {
  max-width: 800px;
}





</style>
</head>

<body>
  <nav class="custom-navbar">
  <div class="container">
    
    <a href="/">文章</a>
    
    <a href="/tags/">标签</a>
    
    <a href="/about/">关于</a>
    
    <a href="/index.xml">RSS</a>
    
  </div>
</nav>
  
  <div class="container">
    <article>
      <h1>use sublime Text</h1>
<h3 id="如何设置折行">如何设置折行</h3>
<p>&lsquo;将配置文件里 添加word_wrap:true 字段&rsquo;</p>
<pre tabindex="0"><code>{
	&#34;color_scheme&#34;: &#34;Packages/Color Scheme - Default/Monokai.tmTheme&#34;,
	&#34;font_size&#34;: 13,
	&#34;word_wrap&#34;: true,
	&#34;ignored_packages&#34;:
	[
		&#34;Vintage&#34;
	]
}
</code></pre><pre tabindex="0"><code>痛点1：每次编写完Python文件后都要切到terminal下输入python fileName.py命令执行文件。
解决：mac版sublime text编辑器使用shift+command+b选择Python 直接执行文件
</code></pre><pre tabindex="0"><code>痛点2：sublime默认执行的Python版本是系统默认的，不能直接使用Python3来执行Python文件
解决：Tools--&gt;Build System--&gt;New Build System 写入：
{
	&#34;shell_cmd&#34;: &#34;/usr/local/homebrew/bin/python3 ${file}&#34;,
	&#34;selector&#34; :&#34;source.python&#34;,
	&#34;file_regex&#34;:&#34;^(...*?):[0-9]:?([0-9]*)&#34;,
	&#34;working_dir&#34;:&#34;${file_path}&#34;,
	&#34;env&#34;: {&#34;PYTHONIOENCODING&#34;: &#34;utf8&#34;},
}
保存为/Packages/User/python3.sublime-build
然后选择环境为python3即可

ps: `env` //设置编码格式
`shell_cmd` 使用的路径，通过在terminal中执行which Python3 获得
</code></pre>
    </article>
  </div>

  
  
  

  
</body>

</html>